import React from 'react'
import classNames from 'classnames'
import './index.scss'

const WebIcon = ({ name, width = '18', height, className = '', onClick }) => { // 适用于自定义ICON
  const Icon = require(`/public/assets/Icon/svg/${name}.svg`)
  return <img src={Icon} alt='ICON' style={{ width: `${width}px`, height: `${height}px` }}  className={classNames(className, 'web-icon')} onClick={() => onClick?.()}/>
}

export default WebIcon
